﻿/*==============================================================
 * PaymentInfoModel.cs
 * Copyright (C) 2014 贵州惠众互联 Inc. All rights reserved.
 *==============================================================
 * Author:   罗应红
 * Date:     2014/02/21 17:57:31.
 * Version:  1.0
 * QQ:		 88962800
*==============================================================*/

using System.Collections.Generic;
using QDT.Common.Plugins;

namespace QDT.Web.Admin.Models {

    public class PaymentSettingModel
    {
        //public PaymentConfigModel()
        //{
        //    //RegUrl = payment.regUrl;
        //    IsInstall = true;
        //    FeeType = payment.FeeType;
        //    Logo = payment.Logo;
        //    Config = !string.IsNullOrEmpty(payment.Config)
        //        ? JsonConvert.DeserializeObject<Dictionary<string, PaymentInfo.ConfigInfo>>(payment.Config) : null;
        //    TotalAmount = payment.TotalAmount;
        //    Description = payment.Description;
        //    Name = payment.Name;
        //    FeeAmount = payment.FeeAmount;
        //    OnlinePay = payment.OnlinePay;
        //    IsEffect = payment.IsEffect;
        //    ClassName = payment.ClassName;
        //    Id = payment.ID;
        //}

        public PaymentSettingModel()
        {
        }

        public int ID { set; get; }

        /// <summary>
        /// 类名
        /// </summary>
        public string ClassName { get; set; }

        /// <summary>
        /// 是否有效
        /// </summary>
        public bool IsEffect { get; set; }

        /// <summary>
        /// 支付方式
        /// <remarks>
        /// 1:在线支付，0：线下支付
        /// </remarks>
        /// </summary>
        public int OnlinePay { get; set; }

        /// <summary>
        /// 手续旨或利率
        /// </summary>
        public decimal FeeAmount { get; set; }
        /// <summary>
        /// 接口名
        /// </summary>
        public string Name { get; set; }
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; set; }
        /// <summary>
        /// 总收款
        /// </summary>
        public decimal TotalAmount { get; set; }
        /// <summary>
        /// logo地址
        /// </summary>
        public string Logo { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; set; }
        /// <summary>
        /// 利率类型
        /// <remarks>
        /// 0:定额
        /// 1：比率
        /// </remarks>
        /// </summary>
        public int FeeType { get; set; }
        /// <summary>
        /// 是否安装
        /// </summary>
        public bool IsInstall { set; get; }
        /// <summary>
        /// 注册地址
        /// </summary>
        public string RegUrl { set; get; }
        
    }

    public class PaymentListModel {

        public int ID { get; set; }

        public string ClassName { get; set; }

        public string Name { get; set; }

        public bool IsEffect { get; set; }

        public bool IsInstall { get; set; }

        public bool OnlinePay { get; set; }

        public decimal TotalAmount { get; set; }

        public int Sort { get; set; }
    }
}